home *** CD-ROM | disk | FTP | other *** search
/ Total Network Tools 2002 / NextStepPublishing-TotalNetworkTools2002-Win95.iso / Archive / Offline Browsing / HTTrack.exe / data1.cab / Sources / src / htshash.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-04-28  |  2.5 KB  |  72 lines

  1. /* ------------------------------------------------------------ */
  2. /*
  3. HTTrack Website Copier, Offline Browser for Windows and Unix
  4. Copyright (C) Xavier Roche and other contributors
  5.  
  6. This program is free software; you can redistribute it and/or
  7. modify it under the terms of the GNU General Public License
  8. as published by the Free Software Foundation; either version 2
  9. of the License, or any later version.
  10.  
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with this program; if not, write to the Free Software
  18. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  19.  
  20.  
  21. Important notes:
  22.  
  23. - We hereby ask people using this source NOT to use it in purpose of grabbing
  24. emails addresses, or collecting any other private information on persons.
  25. This would disgrace our work, and spoil the many hours we spent on it.
  26.  
  27.  
  28. Please visit our Website: http://www.httrack.com
  29. */
  30.  
  31.  
  32. /* ------------------------------------------------------------ */
  33. /* File: httrack.c subroutines:                                 */
  34. /*       hash table system (fast index)                         */
  35. /* Author: Xavier Roche                                         */
  36. /* ------------------------------------------------------------ */
  37.  
  38.  
  39.  
  40. #ifndef HTSHASH_DEFH
  41. #define HTSHASH_DEFH 
  42.  
  43. #include "httrack.h"
  44.  
  45. // tables de hashage
  46. int hash_read(hash_struct* hash,char* nom1,char* nom2,int type);
  47. void hash_write(hash_struct* hash,int lpos);
  48. int* hash_calc_chaine(hash_struct* hash,int type,int pos);
  49. unsigned long int hash_cle(char* nom1,char* nom2);
  50.  
  51. // -- 
  52.  
  53. // simple hash table for other routines
  54. typedef struct hash_chain {
  55.   long int  pos;                 /* position */
  56.   char value[HTS_URLMAXSIZE*2];  /* www.foo.com/secure/ */
  57.   struct hash_chain* next;       /* next element */
  58. } hash_chain;
  59.  
  60.  
  61. int  inthash_write(hash_chain** hash,int hash_size,char* str,long int e);
  62. int  inthash_inc(hash_chain** hash,int hash_size,char* str);
  63. void inthash_add(hash_chain** hash,int hash_size,char* str,long int e);
  64. int  inthash_read(hash_chain** hash,int hash_size,char* str,long int* e);
  65. void inthash_init(hash_chain** hash,int hash_size);
  66. void inthash_del(hash_chain** hash,int hash_size);
  67. void inthash_mdel(hash_chain** hash,int hash_size);
  68. void inthash_delchain(hash_chain* hash,int free_int);
  69.  
  70.  
  71. #endif
  72.